
var template = '<div class="modal">'+
	  	'<div class="modal-dialog modal-sm">'+
	  		'<div class="modal-content">'+
	  			'<div class="modal-header header">'+
	  				'<span class="close" data-dismiss="modal">&times;</span>'+
	  				'<div class="modal-title modaltitle">'+
	  					'<h4>xxx</h4>'+
	  				'</div>'+
	  			'</div>'+
	  			'<div class="modal-body">'+
	  			'xxxxx'+
	  			'</div>'+
	  			'<div class="modal-footer">'+
	  				'xxxxxx'+
	  			'</div>'+
	  		'</div>'+
	  	'</div>'+
   	'</div>';

dialog = $(template);
dialog.on('hide.bs.modal',function(){
	this.remove();
});
function messageDialog(title,content){
	dialog.find('.modal-title').html(title);
	dialog.find('.modal-body').html(content);
	var btnHtml ='<button class="btn btn-default btn-sm" data-dismiss="modal" id="Button">知道了</button>';
	dialog.find('.modal-footer').html(btnHtml);
	dialog.modal('show');
};

function confirmDialog(title,content){
	dialog.find('.modal-title').html(title);
	dialog.find('.modal-body').html(content);
	var btnsHtml ='<a  id="confirm" type="button" href="Logout.php" class="btn btn-default btn-sm">确定</a>'+
					'<button class="btn btn-default btn-sm" data-dismiss="modal">取消</button>';
	dialog.find('.modal-footer').html(btnsHtml);
	dialog.modal('show');
};
function fileinputDialog(title,content){
	dialog.find('.modal-title').html(title);
	var content = '<input name="img" class="fileinput" type="file"/>';
	dialog.find('.modal-body').html(content);
	var btnHtml ='<button class="btn btn-default btn-sm" data-dismiss="modal">关闭</button>';
	dialog.find('.modal-footer').html(btnHtml);
	dialog.modal('show');
};
// function messageDialog(title,content){
	// dialog.find('.modal-title').html(title);
	// dialog.find('.modal-body').html(content);
	// dialog.modal('show');
// };





